<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>查询</title>
	 <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
	 <link rel="stylesheet" href="../css/base.css">
	 <link rel="stylesheet" href="../css/baobao-main.css">
</head>
<body>
<script type="text/javascript">
	 ~function () {
        // Gets a high and sets the visual window
        var width = document.getElementsByTagName('html')[0].getBoundingClientRect().width,
                fontSize = document.getElementsByTagName("html")[0];
                if(width> 750){
                    width=750;
                }
        fontSize.style.fontSize = width * 0.05 + "px";
    }()
</script>


<div class="warp">
    <div class="logo">
        <div class="logo_img">
            <img src="../images/logo.png" alt="logo">
        </div>
    </div>
    <form action="" method="post" role="form" onsubmit="return validateForm();">
        <div class="query">
            <span>订单查询：</span>
            <input type="tel" class="query_num" id="num" placeholder="请输入你要查询的订单号">
        </div>
        <div class="query">
            <span>手机号码：</span>
            <input type="tel" name="tel" class="query_num" id="telValue" placeholder="请输入你的手机号">
        </div>
         <input type="submit" class="sub_btn" value="确定">
    </form>

<!--<div class="btn">
        <a href="javascript:void(0);">确定</a>
 </div> -->
</div>

<script type="text/javascript">
    function validateForm(){
        var numValue=document.getElementById("num").value;
        var telValue=document.getElementById("telValue").value;
        var numReg=/^[0-9]+$/;
        var telReg=/^(0|86|17951)?(13[0-9]|15[0-9]|17[6-8]|18[0-9]|14[57])[0-9]{8}$/;
        if(numValue==""){
            alert("输入单号不能为空")
            return false
        }else if(!numReg.test(numValue)){
            alert("单号只能输入数字")
            return false
        }else{
            // alert("单号已提交")
        }

        if(telValue==""){
            alert("输入手机号不能为空")
            return false
        }else if(!telReg.test(telValue)){
            alert("输入正确的手机号")
            return false
        }else{
            // alert("手机号已提交")
        }

        if(numReg.test(numValue)&&telReg.test(telValue)){
            alert("已提交")
        }
        
    return true
    }
</script>
</body>
</html>